package HomeWork.payment.factory;

import HomeWork.payment.inter.BankPay;
import HomeWork.payment.inter.CardPay;
import HomeWork.payment.inter.Pay;
import HomeWork.payment.inter.PayImpl;

public final class PayFactory {
    public static Pay getInstance(String select){
        return switch (select) {
            case "1" -> new PayImpl();
            case "2" -> new BankPay();
            case "3" -> new CardPay();
            default -> null;
        };
    }
}
